package com.maxh.service.impl;

import com.maxh.mapper.PushMapper;
import com.maxh.pojo.Push;
import com.maxh.service.PushService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("NoticeService")
public class PushServiceImpl implements PushService {
    @Autowired(required=false)
    PushMapper pushMapper;


    @Override
    public List<Map<String, Object>> getNoticeList() {
        return pushMapper.noticeList();
    }

    @Override
    public Boolean updateUseStatus(Push push) {
        return pushMapper.updateUseStatus(push);
    }

    @Override
    public Boolean deleteNotice(String id) {
        return pushMapper.deleteNoticeById(id);
    }

    @Override
    public Boolean updateNoticeList(Push push) {
        return pushMapper.updateNotice(push);
    }

    @Override
    public Push searchNoticeById(Push push) {
        return pushMapper.findNotice(push);
    }

    @Override
    public Boolean addNoticeList(Push push) {
        return pushMapper.saveNotice(push);
    }

    @Override
    public List<Map<String, Object>> getArticleList() {
        return pushMapper.findArticleList();
    }

    @Override
    public List<Map<String, Object>> getNoticeListByStatus() {
        return pushMapper.noticeListByStatus();
    }

    @Override
    public List<Map<String, Object>> getArticleListByUser() {
        return pushMapper.findArticleByUser();
    }

}
